package com.zatech.cgnci.project.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zatech.cgnci.project.entity.CgnciReinsuranceInfoDO;
import com.zatech.cgnci.project.entity.CgnciReinsuranceRiskInsuredDO;
import com.zatech.cgnci.project.vo.CgnciReinsuranceInfoProjectVO;
import com.zatech.cgnci.project.vo.CgnciReinsuranceInfoVO;

import java.util.List;

/**
 * <p>
 * 分入分出信息表 服务类
 * </p>
 *
 * @author Generator
 * @since 2024-12-17
 */
public interface CgnciReinsuranceInfoService extends IService<CgnciReinsuranceInfoDO> {

    CgnciReinsuranceInfoVO getReinsuranceInfo(Long insuranceId);

    CgnciReinsuranceInfoProjectVO getDivideInReinsuranceByProjectId(Long projectId);

    List<CgnciReinsuranceInfoProjectVO> listHyDivideOutReinsuranceByProjectId(Long projectId);

    CgnciReinsuranceInfoProjectVO getLfDivideOutReinsuranceByProjectId(Long projectId);

    CgnciReinsuranceInfoVO getDivideInReinsuranceByInsuranceId(Long insuranceId);

    CgnciReinsuranceInfoVO getLfDivideOutReinsuranceByInsuranceId(Long insuranceId);

    List<CgnciReinsuranceInfoVO> listHyDivideOutReinsuranceByInsuranceId(Long insuranceId);

    Integer countHyReinsuranceInfo(Long businessId, String type, String riskSubTypeCode);

    /**
     * 分入/分出字段汇总更新
     *
     * @param riskInsuredDOS    险种标的
     * @param reinsuranceInfoDO 分入/分出信息
     * @param layerId           层id
     */
    void updateReinsuranceColumn(List<CgnciReinsuranceRiskInsuredDO> riskInsuredDOS, CgnciReinsuranceInfoDO reinsuranceInfoDO, Long layerId);
}
